
//
//  UIButton+Extention.swift
//  添加图片框架
//
//  Created by zhangguo on 15/10/21.
//  Copyright © 2015年 zhangguo. All rights reserved.
//

import UIKit

extension UIButton {

      //遍历构造函数
    convenience init(imageNmame:String) {
    self.init()
        
     setImage(imageNmame)
    
    }
    func setImage(imageName:String)
    {
        setImage(UIImage(named: imageName), forState: UIControlState.Normal)
        setImage(UIImage(named: imageName + "_highlighted"), forState: UIControlState.Highlighted)
        
    }

}